{extend name="admin@public/content"}

{block name="content"}
<script>
	$(function () {
		$('.layui-tab ul.layui-tab-title li:first').trigger('click');
	});
</script>
<form onsubmit="return false;" action="{:request()->url()}" data-auto="true" method="post"
			class='form-horizontal layui-form padding-top-20'>
	<div class="layui-tab layui-tab-card layui-box">
		<ul class="layui-tab-title">
			<li>系统配置</li>
			<li>联系方式</li>
			<li>banner</li>
		</ul>
		<div class="layui-tab-content">
			<!--系统配置-->
			<div class="layui-tab-item">

				<div class="form-group">
					<label class="col-sm-2 control-label">
						公司名称<br><span class="nowrap color-desc"></span>
					</label>
					<div class='col-sm-8'>
						<input name="title" required="required" title="请输入公司名称" placeholder="请输入公司名称" value="{$vo.title|default=''}"
									 class="layui-input" disabled="disabled">
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label">
						公司标识<br><span class="nowrap color-desc"></span>
					</label>
					<div class='col-sm-8'>
						<input name="mp_name" required="required" title="请输入公司标识" placeholder="请输入公司标识"
									 value="{$vo.mp_name|default=''}" class="layui-input" disabled="disabled">
					</div>
				</div>
				<div class="hr-line-dashed"></div>
				<div class="form-group">
					<label class="col-sm-2 control-label">
						appId<br><span class="nowrap color-desc"></span>
					</label>
					<div class='col-sm-8'>
						<input name="appid" required="required" title="请输入appId" placeholder="请输入appId" value="{$vo.appid}"
									 class="layui-input">
						<p class="help-block">微信小程序appId</p>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">
						appSecret<br><span class="nowrap color-desc"></span>
					</label>
					<div class='col-sm-8'>
						<input name="appsecret" required="required" title="请输入appSecret" placeholder="请输入appSecret"
									 value="{$vo.appsecret}"
									 class="layui-input">
						<p class="help-block">微信小程序appSecret</p>
					</div>
				</div>

			</div>
			<!--联系方式-->
			<div class="layui-tab-item">
				<div class="form-group">
					<label class="col-sm-2 control-label">
						联系人<br><span class="nowrap color-desc"></span>
					</label>
					<div class='col-sm-8'>
						<input name="link_username" required="required" title="请输入联系人" placeholder="请输入联系人"
									 value="{$vo.link_username|default=''}"
									 class="layui-input">
						<p class="help-block"></p>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">
						联系电话<br><span class="nowrap color-desc"></span>
					</label>
					<div class='col-sm-8'>
						<input name="link_mobile" required="required" title="请输入联系电话" placeholder="请输入联系电话"
									 value="{$vo.link_mobile|default=''}"
									 class="layui-input">
						<p class="help-block"></p>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">
						联系地址<br><span class="nowrap color-desc"></span>
					</label>
					<div class='col-sm-8'>
						<input name="link_address" required="required" title="请输入联系地址" placeholder="请输入联系地址"
									 value="{$vo.link_address|default=''}"
									 class="layui-input">
						<p class="help-block"></p>
					</div>
				</div>
			</div>
			<!--banner-->
			<div class="layui-tab-item">
				{for start="0" end="3" step="1" name="banner"}
				<div class="form-group">
					<label class="col-sm-2 control-label">
						Banner图片<br><span class="nowrap color-desc">banner{$banner+1}</span>
					</label>
					<div class='col-sm-8'>
						<img data-tips-image style="height:auto;max-height:32px;min-width:32px" src="{$vo['banner'][$banner]}"/>
						<input type="hidden" name="banner_{$banner}" onchange="$(this).prev('img').attr('src', this.value)"
									 value="{$vo['banner'][$banner]}" class="layui-input">
						<a class="btn btn-link" data-file="one" data-uptype="local" data-type="jpg,png"
							 data-field="banner_{$banner}">上传图片</a>
						<p class="help-block">建议上传banner的尺寸为750x320px，</p>
					</div>
				</div>
				{/for}
			</div>

		</div>
	</div>

	<div class="hr-line-dashed"></div>

	<div class="col-sm-4 col-sm-offset-2">
		<div class="layui-form-item text-center">
			<button class="layui-btn" type="submit">保存配置</button>
		</div>
	</div>

</form>
<script>
	window.laydate.render({range: false, elem: '#end_at'});
</script>

{/block}